Banded Report Editor - Barcodes
Argos version 6.0 and higher supports the ability to print USPS Intelligent Mail and Code 128 type barcodes on your banded reports. These barcodes can be used for various purposes, such as taking advantage of US Postal Service bulk mailing discounts, scanning standardized forms, and other applications.
There are three steps required to produce barcodes in Argos:
- Install the barcode font.
- Store the string to be encoded (the text of the barcode) into a variable.
- Add the barcode data field to the report, referencing the variable you created.
Installing Barcode Fonts
As with any other fonts used in Argos reports, the barcode font you wish to use must be installed on both the report developer’s machine and the MAPS server. The list of fonts visible in the drop-downs in Argos is populated from the client machine, but the fonts used at run time are those on the server (since MAPS does the actual job processing).
You can download the USPS Intelligent Mail barcode fonts and Code 128 barcode fonts from the Documentation and Software page of the Evisions website. After unzipping the file, refer to the instructions in the \docs\ folder to install the fonts.
In order to print hard copy output, the MAPS server must be rebooted before any new fonts can be used. PDF output should render correctly without a reboot. Note that it is the actual machine that must be restarted, not just the MAPS service.
Creating the Barcode String
The barcode string is the text that is read when scanning the barcode. You can create this string using a SQL statement, and then store it into a variable for use in the report.
- DataBlock Designers can create a variable within the DataBlock or select the data as part of the report query.
- Report Writers can add a dataset and select the desired data using the dataset query.
The string format and contents will depend on your purpose for using a barcode. You should construct the string to match whatever format is specified by the application or process that will be reading the barcodes.
Code 128 Barcode Format
Code 128 barcodes can be used for a wide variety of applications. The format of the barcode string will depend on your specific usage, but can include alphanumeric or numeric-only characters as required.
USPS Intelligent Mail Barcode Format
The United States Postal Service provides mailing discounts to customers who use barcodes to identify large volumes of outgoing mail. This solution is also known as the USPS OneCode Solution or USPS 4-State Customer barcode (4CB, 4-CB, or USPS4CB).
In this case, the barcode string contains a number that represents address and postage information. This barcode is added to the report in such a way that it will print on envelopes or on the mailer portion of a form.
The barcode consists of a 20 to 31-digit number containing information identifying the sender, the mail class, and the destination ZIP code. The first half of the barcode is a tracking code composed of the barcode identifier, service type identifier, mailer identifier, and serial number. The second half contains the recipient's routing (ZIP) code.
Code | Field | Digits | Description |
---|---|---|---|
Tracking code | Barcode Identifier | 2 | Presort identification number – describes whether or not the mail has already been sorted to some extent. Chart of USPS Barcode Identifiers. |
Tracking code | Service Type Identifier | 3 | Type of mail service (e.g. first class, standard, priority, etc.). Chart of USPS Service Type Identifiers. |
Tracking code | Mailer Identifier | 6 or 9 | Unique number identifying the USPS customer (the sender). Assigned by USPS . |
Tracking code | Serial number | 9 or 6 |
Sender’s serial or sequence number to track each piece of mail.
|
Routing code | Delivery point ZIP code | 0, 5, 9, or 11 | Recipient’s ZIP code. |
Total | - | 20-31 | Total barcode length depends on length of routing code |
For exact specifications and any updates or changes, please refer to the USPS publications available at https://postalpro.usps.com/mailing/intelligent-mail-barcode.
Adding the Barcode Datafield
To add a barcode to your banded report, select the barcode button on the object toolbar and then click the location on the report where you would like to place the barcode. The Barcode Datafield dialog will open, allowing you to specify the data source and various barcode properties:
- Dataset and Field - In the first drop-down, select the dataset containing the field you wish to use. In the second, select the desired field.
- Barcode Type - Choose from a list of predefined barcode encoding types. Available options include USPS Intelligent Mail and Code 128.
- Font - Select the barcode font that has been installed on your machine. This font should correspond to the barcode type you have chosen. Note that the font must also be installed on the MAPS server in order for the barcode to display (see Installing Barcode Fonts above).
- Transparent - When checked, the background of the barcode field will be transparent, allowing the band color or other objects behind the barcode to show through.
- Autosize width - When checked, Argos will automatically resize the barcode field to fit the width of the text.
- Rotation - Select the number of degrees that the barcode should be rotated. The rotation can be anywhere from 0 to 360 degrees. As an example, a 90 degree rotation would place the field vertically, with the text direction going from bottom to top.
Troubleshooting
Nothing is printing where a USPS Intelligent Mail barcode should appear
If the USPS Intelligent Mail barcode encoder receives invalid input, it will not print. This feature helps to prevent mail from being sent out with invalid barcodes.
- Check to make sure that the barcode variable contains exactly the right number of characters. Valid numeric string lengths are 20, 25, 29, and 31 characters, depending on the length of the ZIP code.
- Verify that each of the USPS-defined fields is correct. For example, the Barcode Identifier must be one of the six values shown in the USPS chart linked above.
- To view the numeric string being stored in the barcode variable, temporarily turn off the barcode encoding in the barcode properties dialog and run the report to view it in plain text.
The barcode is printing as a string of letters instead of as a barcode
This indicates that the numeric string has been encoded, but the system is unable to use the barcode font that turns the character string into an actual barcode. Check to make sure that:
- The font has been installed on the local machine and on the MAPS server.
- The correct encoding and font have been selected in the Barcode Datafield properties dialog.
- The MAPS server has been rebooted since the font was installed.
The barcode is the wrong size/in the wrong location
- Barcode sizes are determined by the barcode font. Some fonts, such as the USPS Intelligent Mail barcode fonts, include multiple font variants at different sizes. To adjust the size, make sure the desired font variant is installed on your machine and on the MAPS server, and then select it in the barcode properties dialog.
- To change the location, click and drag the barcode object as you would with any other form object. If printing the barcode above an address block, align the left side of the barcode object with the left side of the address. Using the alignment tools can make it easier to line up multiple objects.
- The Autosize Width option does not work correctly with rotated barcodes. There is also a known issue with USPS Intelligent Mail barcodes printed using the Run Report -> Print option. If your barcodes are being cut off or have too much space between the bars, try disabling the Autosize Width and making the field the desired length manually.
The barcode looks correct but does not scan
- Make sure you have selected the correct barcode type and font.
- Try disabling the Autosize Width option on the barcode field. There is a known issue with USPS Intelligent Mail barcodes printed using the Run Report -> Print option in the Argos client that results in too much whitespace between the bars. The easiest option is to set the field width manually, but you can also print the report from the Web Viewer, via the Print Preview window in the Argos client, or from a schedule.
- There is a known issue where MW6 Code128XL barcodes do not print correctly when run from the Web Viewer. The workaround is to use a different size barcode font, or to run the report through the Argos client instead.
Recipients of PDF files are unable to view the barcodes
By default, PDF files produced by Argos save the fonts as part of the PDF file. If the font embedding is set to None for some reason, this may prevent users from viewing the fonts (including barcode fonts) unless the user happens to have the required font installed on their machine. To make sure that barcodes display correctly in PDF output, you should leave the font embedding set to Full or Subset in the PDF options.